package com.secxiot.provider.user.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ToString
public class SysExchangeRecord implements Serializable {
    private static final long serialVersionUID = -2355737121310273564L;

    @ApiModelProperty(value = "兑换记录ID", required = true)
    private Long exchangeRecordId;

    @ApiModelProperty(value = "医院ID", required = true)
    private Long hospitalId;

    @ApiModelProperty(value = "用户ID", required = true)
    private Long userId;

    @ApiModelProperty(value = "兑换规则ID", required = true)
    private Long exchangeRulesId;

    @ApiModelProperty(value = "兑换账户ID", required = true)
    private Long accountId;

    @ApiModelProperty(value = "商品编码", required = true)
    private String goodsCode;

    @ApiModelProperty(value = "商品名称", required = true)
    private String goodsName;

    @ApiModelProperty(value = "商品价格", required = true)
    private String goodsPrice;

    @ApiModelProperty(value = "商品URL", required = true)
    private String goodsUrl;

    @ApiModelProperty(value = "兑换商品所需积分数量", required = true)
    private Long goodsIntegralNum;

    @ApiModelProperty(value = "实际消耗积分数量", required = true)
    private Long integralNum;

    @ApiModelProperty(value = "兑换状态：1-兑换进行中,2-兑换成功,3兑换失败", required = true)
    private Integer state;

    @ApiModelProperty(value = "状态：0-无效，1-有效", required = true)
    private Integer status;

    @ApiModelProperty(value = "创建人", required = true)
    private Long createrId;

    @ApiModelProperty(value = "兑换时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "编辑人", required = false)
    private Long modifierId;

    @ApiModelProperty(value = "编辑时间", required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
}